package com.wkbb.common.utils;

import com.wkbb.common.enums.SmartPositionEnum;

/**
 * @author dengjingyuan
 * @date 2020-05-13 14:10
 */
public class PositionUtil {

    /**
     * 获取岗位ID
     *
     * @param orgType 学校类型
     * @param type    身份1:创建者3:超级管理员4:部门管理员5:应用管理员6:分校区管理员7:班主任:8:任课老师(辅导员)9:校长
     * @return 学生信息
     */
    public static Integer getPosition(Integer orgType, Integer type) {

        switch (orgType) {
            case 5:

                if (null == type) {

                    return SmartPositionEnum.ORG_TYPE_5_TEACHERCOURSE.getCode();
                } else {
                    switch (type) {
                        case 7:
                            return SmartPositionEnum.ORG_TYPE_5_MASTERTEACHER.getCode();

                        case 8:
                            return SmartPositionEnum.ORG_TYPE_5_TEACHERCOURSE.getCode();

                        case 9:
                            return SmartPositionEnum.ORG_TYPE_5_MASTER.getCode();

                        default:
                            return SmartPositionEnum.ORG_TYPE_5_TEACHERCOURSE.getCode();

                    }
                }

            case 6:

                if (null == type) {

                    return SmartPositionEnum.ORG_TYPE_6_MASTERTEACHER.getCode();
                } else {
                    switch (type) {
                        case 7:
                            return SmartPositionEnum.ORG_TYPE_6_MASTERTEACHER.getCode();

                        case 8:
                            return SmartPositionEnum.ORG_TYPE_6_MASTERTEACHER.getCode();

                        case 9:
                            return SmartPositionEnum.ORG_TYPE_6_MASTER.getCode();

                        default:
                            return SmartPositionEnum.ORG_TYPE_6_MASTERTEACHER.getCode();

                    }
                }

            case 7:

                if (null == type) {

                    return SmartPositionEnum.ORG_TYPE_7_MASTERTEACHER.getCode();
                } else {
                    switch (type) {
                        case 7:
                            return SmartPositionEnum.ORG_TYPE_7_MASTERTEACHER.getCode();

                        case 8:
                            return SmartPositionEnum.ORG_TYPE_7_MASTERTEACHER.getCode();

                        case 9:
                            return SmartPositionEnum.ORG_TYPE_7_MASTER.getCode();

                        default:
                            return SmartPositionEnum.ORG_TYPE_7_MASTERTEACHER.getCode();

                    }
                }

            case 8:

                if (null == type) {

                    return SmartPositionEnum.ORG_TYPE_8_MASTERTEACHER.getCode();
                } else {
                    switch (type) {
                        case 7:
                            return SmartPositionEnum.ORG_TYPE_8_MASTERTEACHER.getCode();

                        case 8:
                            return SmartPositionEnum.ORG_TYPE_8_MASTERTEACHER.getCode();

                        case 9:
                            return SmartPositionEnum.ORG_TYPE_8_MASTER.getCode();

                        default:
                            return SmartPositionEnum.ORG_TYPE_8_MASTERTEACHER.getCode();

                    }
                }

            case 9:

                if (null == type) {

                    return SmartPositionEnum.ORG_TYPE_9_MASTERTEACHER.getCode();
                } else {
                    switch (type) {
                        case 7:
                            return SmartPositionEnum.ORG_TYPE_9_MASTERTEACHER.getCode();

                        case 8:
                            return SmartPositionEnum.ORG_TYPE_9_MASTERTEACHER.getCode();

                        case 9:
                            return SmartPositionEnum.ORG_TYPE_9_MASTER.getCode();

                        default:
                            return SmartPositionEnum.ORG_TYPE_9_MASTERTEACHER.getCode();

                    }
                }

            case 11:

                if (null == type) {

                    return SmartPositionEnum.ORG_TYPE_11_MASTERTEACHER.getCode();
                } else {
                    switch (type) {
                        case 7:
                            return SmartPositionEnum.ORG_TYPE_11_MASTERTEACHER.getCode();

                        case 8:
                            return SmartPositionEnum.ORG_TYPE_11_MASTERTEACHER.getCode();

                        case 9:
                            return SmartPositionEnum.ORG_TYPE_11_MASTER.getCode();

                        default:
                            return SmartPositionEnum.ORG_TYPE_11_MASTERTEACHER.getCode();

                    }
                }

            case 13:

                if (null == type) {

                    return SmartPositionEnum.ORG_TYPE_13_MASTERTEACHER.getCode();
                } else {
                    switch (type) {
                        case 7:
                            return SmartPositionEnum.ORG_TYPE_13_MASTERTEACHER.getCode();

                        case 8:
                            return SmartPositionEnum.ORG_TYPE_13_MASTERTEACHER.getCode();

                        case 9:
                            return SmartPositionEnum.ORG_TYPE_13_MASTER.getCode();

                        default:
                            return SmartPositionEnum.ORG_TYPE_13_MASTERTEACHER.getCode();

                    }
                }

            case 14:
                if (null == type) {

                    return SmartPositionEnum.ORG_TYPE_14_MASTERTEACHER.getCode();
                } else {
                    switch (type) {
                        case 7:
                            return SmartPositionEnum.ORG_TYPE_14_MASTERTEACHER.getCode();

                        case 8:
                            return SmartPositionEnum.ORG_TYPE_14_MASTERTEACHER.getCode();

                        case 9:
                            return SmartPositionEnum.ORG_TYPE_14_MASTER.getCode();

                        default:
                            return SmartPositionEnum.ORG_TYPE_14_MASTERTEACHER.getCode();

                    }
                }

            case 15:
                if (null == type) {

                    return SmartPositionEnum.ORG_TYPE_15_MASTERTEACHER.getCode();
                } else {
                    switch (type) {
                        case 7:
                            return SmartPositionEnum.ORG_TYPE_15_MASTERTEACHER.getCode();

                        case 8:
                            return SmartPositionEnum.ORG_TYPE_15_MASTERTEACHER.getCode();

                        case 9:
                            return SmartPositionEnum.ORG_TYPE_15_MASTER.getCode();

                        default:
                            return SmartPositionEnum.ORG_TYPE_15_MASTERTEACHER.getCode();

                    }
                }

            default:
                break;
        }
        return null;
    }
}
